package com.glp.work.flow.service;

import com.glp.work.flow.dto.request.StartProcessRequestDTO;
import com.glp.work.flow.request.DeleteRuningOrderRequest;
import com.glp.work.flow.response.OrderHisInfoResponse;
import com.glp.work.flow.response.OrderStatusResponse;
import com.glp.work.flow.response.ProcessInitiateResponse;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 提交工作流服务
 *
 * @author pengjia
 * @version 2020年3月9日 下午5:11:43
 */
@Service
public interface WfProcessInitiateService {

    ProcessInitiateResponse processInitiateDoMain(StartProcessRequestDTO target);

    boolean validateDuplicavteProcess(String orderId, String appId, String procDefKey,String batch);

    boolean validateProDefKey(String proDefKey);

    OrderStatusResponse queryOrderStatus(String processId);

    List<OrderHisInfoResponse> queryHistoryRecordsByOrderId(String orderId);

    String validateFormData(String proDefKey, Map<String, Object> formData);

    boolean validateAppId(String appId);

    boolean validateAssignSetting(String procDefKey);

    void updateOrderStatus(OrderStatusResponse response);

    String deleteRuningOrder(DeleteRuningOrderRequest deleteRuningOrderRequest);
    
    String auditFailRuningOrder(DeleteRuningOrderRequest deleteRuningOrderRequest);

    /**
     * @description : 删除此流程下所有工单信息
     * @params : [prcDefKey]
     * @returns : void
     * @author : 郭永伟
     * @date : 2021/1/18
    */
    void removeOrderByProcDefKey(String prcDefKey);
}
